#include <stdio.h>
#include <string.h>
int main()
{
    int i;
    char s[1001];
    while (~scanf("%s", &s))
    {
        int x = 1;
        for (i = 0; i < strlen(s) - 1; i++)
        {
            if (s[i] == s[i + 1])
                x = 0;
        }
        if (x)
            printf("Yes\n");
        else
            printf("No\n");
    }
    return 0;
}